]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: update slide in translations from pageEmpty
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 18 Feb 2013 06:25:54 +0000 (01:25 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 18 Feb 2013 14:34:06 +0000 (09:34 -0500)
Now that we unified animation times, move in controls together with the
new view.

https://bugzilla.gnome.org/show_bug.cgi?id=694064

js/ui/overviewControls.js

index f96502029be214146d8200ee66fbfda812138a69..3bbeb97c990b59ab8cc81efc258522c40787524c 100644 (file)
@@ -133,12 +133,12 @@ const SlidingControl = new Lang.Class({
             return visibleWidth;
     },
 
-    _updateTranslation: function(slidingIn) {
+    _updateTranslation: function() {
         let translationStart = 0;
         let translationEnd = 0;
         let translation = this._getTranslation();
 
-        if (slidingIn) {
+        if (this.visible) {
             translationStart = translation;
         } else {
             translationEnd = translation;
@@ -171,14 +171,13 @@ const SlidingControl = new Lang.Class({
     },
 
     slideIn: function() {
-        this._updateTranslation(true);
         this.visible = true;
-        // we will update slideX from pageEmpty
+        // we will update slideX and the translation from pageEmpty
     },
 
     slideOut: function() {
         this.visible = false;
-        this._updateTranslation(false);
+        this._updateTranslation();
         // we will update slideX from pageEmpty
     },
 
@@ -188,6 +187,7 @@ const SlidingControl = new Lang.Class({
         // the next page, since slideIn or slideOut might have been called,
         // changing the visiblity
         this.layout.slideX = this.getSlide();
+        this._updateTranslation();
     }
 });